<!DOCTYPE html>
<html lang="zh-CN">

{include file="public:header"}

<body class="login-layout blur-login">
<div class="main-container">
  <div class="main-content">
    <div class="row">
      <div class="col-sm-10 col-sm-offset-1">
        <div class="login-container" style="margin-top: 140px">
          <div class="center">
            <h1>
              <i class="ace-icon fa fa-leaf green"></i>
              <span class="red">{$sys.name}</span>
              <span class="white" id="id-text2">后台登录</span>
            </h1>
            <h4 class="blue" id="id-company-text">&copy; 朵朵科技</h4>
          </div>

          <div class="space-6"></div>

          <div class="position-relative">
            <div id="login-box" class="login-box visible widget-box no-border">
              <div class="widget-body">
                <div class="widget-main">
                  <h4 class="header blue lighter bigger">
                    <i class="ace-icon fa fa-coffee green"></i>
                    请填写您的用户信息
                  </h4>

                  <div class="space-6"></div>

                  <form id="logoForm" method="post" action="__URL__/check">
                    <fieldset>
                      <label class="block clearfix">
														<span class="block input-icon input-icon-right">
															<input id="username" type="text" class="form-control" name="username" placeholder="请输入您的用户名" datatype="s5-16" errormsg="用户名至少5个字符,最多16个字符！"/>
															<i class="ace-icon fa fa-user"></i>
														</span>
                      </label>

                      <label class="block clearfix">
														<span class="block input-icon input-icon-right">
															<input id="password" type="password" class="form-control" name="password" placeholder="请输入您的密码" datatype="s5-12" errormsg="密码至少5个字符,最多12个字符！"/>
															<i class="ace-icon fa fa-lock"></i>
														</span>
                      </label>

                      <div class="space"></div>

                      <div class="clearfix">
                        <!-- <label class="inline">
                          <input type="checkbox" class="ace" />
                          <span class="lbl"> 记住密码</span>
                        </label> -->

                        <button id="subBtn" type="submit" class="width-35 pull-right btn btn-sm btn-primary">
                          <i class="ace-icon fa fa-key"></i>
                          <span class="bigger-110">登录</span>
                        </button>
                      </div>

                      <div class="space-4"></div>
                    </fieldset>
                  </form>

                </div>

                <div class="toolbar clearfix">
                  <!-- <div>
                    <a href="#" data-target="#forgot-box" class="forgot-password-link">
                      <i class="ace-icon fa fa-arrow-left"></i> 密码找回
                    </a>
                  </div>
 -->
                  <!--<div>
                    <a href="#" data-target="#signup-box" class="user-signup-link">
                      注册帐号
                      <i class="ace-icon fa fa-arrow-right"></i>
                    </a>
                  </div>-->
                </div>
              </div>
            </div>

            <div id="forgot-box" class="forgot-box widget-box no-border">
              <div class="widget-body">
                <div class="widget-main">
                  <h4 class="header red lighter bigger">
                    <i class="ace-icon fa fa-key"></i>
                    找回密码
                  </h4>

                  <div class="space-6"></div>
                  <p>
                    输入您的电子邮件并验证
                  </p>

                  <form>
                    <fieldset>
                      <label class="block clearfix">
														<span class="block input-icon input-icon-right">
															<input type="email" class="form-control" placeholder="邮箱" />
															<i class="ace-icon fa fa-envelope"></i>
														</span>
                      </label>

                      <div class="clearfix">
                        <button type="button" class="width-35 pull-right btn btn-sm btn-danger">
                          <i class="ace-icon fa fa-lightbulb-o"></i>
                          <span class="bigger-110">发送!</span>
                        </button>
                      </div>
                    </fieldset>
                  </form>
                </div>
                <!-- /.widget-main -->

                <div class="toolbar center">
                  <a href="#" data-target="#login-box" class="back-to-login-link">
                    返回登录
                    <i class="ace-icon fa fa-arrow-right"></i>
                  </a>
                </div>
              </div>
            </div>

           
          </div>

          <div class="navbar-fixed-top align-right">
            <br /> &nbsp;
            <a id="btn-login-dark" href="#">黑暗</a>
            &nbsp;
            <span class="blue">/</span> &nbsp;
            <a id="btn-login-blur" href="#">模糊</a>
            &nbsp;
            <span class="blue">/</span> &nbsp;
            <a id="btn-login-light" href="#">浅色</a>
            &nbsp; &nbsp; &nbsp;
          </div>
        </div>
      </div>
    </div>
  </div>
</div>


<script type="text/javascript">
  jQuery(function($) {
    $(document).on('click', '.toolbar a[data-target]', function(e) {
      e.preventDefault();
      var target = $(this).data('target');
      $('.widget-box.visible').removeClass('visible'); //hide others
      $(target).addClass('visible'); //show target
    });
  });

  jQuery(function($) {
    $('#btn-login-dark').on('click', function(e) {
      $('body').attr('class', 'login-layout');
      $('#id-text2').attr('class', 'white');
      $('#id-company-text').attr('class', 'blue');

      e.preventDefault();
    });
    $('#btn-login-light').on('click', function(e) {
      $('body').attr('class', 'login-layout light-login');
      $('#id-text2').attr('class', 'grey');
      $('#id-company-text').attr('class', 'blue');

      e.preventDefault();
    });
    $('#btn-login-blur').on('click', function(e) {
      $('body').attr('class', 'login-layout blur-login');
      $('#id-text2').attr('class', 'white');
      $('#id-company-text').attr('class', 'light-blue');

      e.preventDefault();
    });

   /*  var datas = $("#logoForm").Validform({
      tiptype: 3
    }); */
   $("#logoForm").ajaxForm({
	   success:function(res){
		   if(res.code==1){
			   
				   location.href=res.url;
			 
			   
		   }else{
			   layer.alert(res.msg,{icon:2},function(){
				   location.href=res.url;
			   })
		   }
	   } 
   });
   // $("#subBtn").on('click',function () {
    //   console.log(datas.getStatus())
    //   // $("#logoForm").ajaxSubmit({
    //   //   type: "get",
    //   //   beforeSubmit: function(){
    //   //
    //   //   },
    //   //   success: function(res) {
    //   //     console.log(res);
    //   //   }
    //   // });
    //   //
    //   // console.log(datas);
    //
    //
    //
    // })

  });

</script>
</body>

</html>